﻿cmake_minimum_required(VERSION 3.31.2)

project(MyWindow)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

# if(WIN32)
#   set(CMAKE_WIN32_EXECUTABLE ON)
# endif()

# Find VTK
set(VTK_DIR "E:\\environment\\vtk9.0\\lib\\cmake\\vtk-9.0")
find_package(VTK REQUIRED)
if (VTK_FOUND)
    message(STATUS "Found VTK ${VTK_VERSION}")
    message(STATUS "VTK INCLUDES:"${VTK_USE_FILE})
    message(STATUS "VTK LIBRARIES:"${VTK_LIBRARIES})
endif()
include(${VTK_USE_FILE})

find_package(Qt5 REQUIRED COMPONENTS Widgets)
add_executable("${PROJECT_NAME}" main.cpp mywindow.cpp mywindow.ui mywindow.qrc)
target_link_libraries("${PROJECT_NAME}" Qt5::Widgets ${VTK_LIBRARIES})